<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml" xmlns:shiro="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="col-sm-12">
			<div class="ibox">
				<div class="ibox-body">
					<div class="fixed-table-toolbar">
						<div class="columns pull-left">
							<button shiro:hasPermission="device:device:add" type="button" class="btn  btn-primary" onclick="add()">
								<i class="fa fa-plus" aria-hidden="true"></i>添加
							</button>
							<button shiro:hasPermission="device:device:batchRemove" type="button" class="btn  btn-danger"
								onclick="batchRemove()">
								<i class="fa fa-trash" aria-hidden="true"></i>删除
							</button>

							<a shiro:hasPermission="device:device:add" type="button" class="btn  btn-primary"
									href="/ttx/device/device/exportDevice">
								<i class="fa fa-download" aria-hidden="true"></i>模板
							</a>

							<button shiro:hasPermission="device:device:add" type="button" class="btn  btn-danger"
									onclick="deviceImport()">
								<i class="fa fa-upload" aria-hidden="true"></i>导入
							</button>

							<!--<div id="wrapper">-->
								<!--<form id="form" th:action="@{/device/device/importDevice}"  method="post"-->
									  <!--enctype="multipart/form-data">-->
									<!--<div class="row" style="text-align: center; padding: 20px">-->
										<!--<input id="file" name="file" type="file" accept="*" class="input-text mb-20">-->
										<!--<a class="btn btn-primary" onclick="submit()">提交</a>-->
									<!--</div>-->
								<!--</form>-->
							<!--</div>-->
						</div>
						<div class="columns pull-right">
							<button class="btn btn-success" onclick="reLoad()">查询</button>
						</div>
						<div class="columns pull-right col-md-2 nopadding">
							<input id="searchName" type="text" class="form-control"
								placeholder="设备名称">
						</div>
					</div>
					<table id="exampleTable" data-mobile-responsive="true">
					</table>
				</div>
			</div>
		</div>
	</div>
	<!--shiro控制bootstraptable行内按钮看见性 -->
		<div>
			<script type="text/javascript">
				var s_edit_h = 'hidden';
				var s_remove_h = 'hidden';
				var s_resetPwd_h = 'hidden';
			</script>
		</div>
		<div >
			<script type="text/javascript">
				s_record_h = '';
			</script>
		</div>
		<div shiro:hasPermission="device:device:edit">
			<script type="text/javascript">
				s_edit_h = '';
			</script>
		</div>
		<div shiro:hasPermission="device:device:remove">
			<script type="text/javascript">
				var s_remove_h = '';
			</script>
		</div>
		<div shiro:hasPermission="device:device:resetPwd">
			<script type="text/javascript">
				var s_resetPwd_h = '';
			</script>
		</div>
	</div>
	<div th:include="include :: footer"></div>
	<script type="text/javascript" th:src="@{/js/appjs/device/device/device.js}" src="/js/appjs/device/device/device.js"></script>
</body>
</html>